<template>
  <div class="container">
    <button @click="add">点击</button><span>pinia-state:xxx{{ userStore.a }}</span>
  </div>
</template>

<script setup name="Home">
// 我要获取到router
// import { useRouter } from 'vue-router'
const route = useRouter()
console.log(route.query.a)
import { useUSerStore } from '@/store/user'
const userStore = useUSerStore()
const add = () => {
  userStore.increament()
}
console.log(userStore)
</script>

<style scoped></style>
